#ifndef __BLUE_MOON_VIEW_MANAGER_H_FILE__
#define __BLUE_MOON_VIEW_MANAGER_H_FILE__
#include <bmCore/export.h>
#include <bmUtil/singleton.h>
#include <osgViewer/Viewer>
#include <osg/vec2>
#include <osg/Camera>

namespace bmCore 
{
  class BMCORE_API ViewerManager : public Singleton<ViewerManager>
  {
    friend class Singleton<ViewerManager>;
    friend class ViewChangeSizeHandler;
    protected:
      ViewerManager();
      ~ViewerManager();
    public:
      osgViewer::Viewer *GetViewer();
      osgViewer::Viewer *GetViewer()const;
      void SetViewer( osgViewer::Viewer *v );

      //CommandExec *GetCommandExec();

      osg::Vec2 GetWindowSize();
      void SetWindowSize(const osg::Vec2 &s);

      void PreFrame();
      void Frame();
      void PostFrame();


      //Picker *GetPicker();
    private:
      osg::ref_ptr<osgViewer::Viewer> _viewer;
      //osg::ref_ptr<CommandExec> _commandExec;
      osg::Vec2 _windowSize;
      //osg::ref_ptr<Picker> _picker;



  };
}


#endif // __CMS_bmKernel_VIEW_MANAGER_H_FILE__
